package com.gnerv.author.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gnerv.author.dto.ArticleDTO;
import com.gnerv.author.entity.Article;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 博客平台-文章表 Mapper 接口
 * </p>
 *
 * @author Gnerv LiGen
 * @since 2019-07-15
 */
public interface ArticleMapper extends BaseMapper<Article> {

    List<ArticleDTO> listArticleByCid(@Param("cId") String cId, Integer state);

    ArticleDTO selectArticle(@Param("bId") String bId);

    List<ArticleDTO> listArticle(ArticleDTO articleDTO, Integer state);

    int releaseArticle(String bId);

    int unReleaseArticle(String bId);
}
